package com.otherTest.keyWords.breakAndContinueKeyWord;

import org.junit.Test;

/**
 * @author Conceit
 * @version 1.0, 2017/1/9
 */
public class TestBreakAndContinue {

    @Test
    public void test(){
        int i=3;
        int y=5;
       for(int x=0;x<6;x++){
           if(i==x){
            System.out.println(i+"=="+x);
               break;//当满足条件后就会跳出本次循环
           }
           if(y==x){
               System.out.println(i+"=="+y);
           }
       }
    }
}
